home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v8n13.arc / TEXT.BAS < prev    next >
Encoding:
BASIC Source File  |  1989-06-10  |  1.2 KB  |  42 lines

  1.  
  2.  
  3. DEFINT A-Z
  4. CLS
  5. INPUT "Enter screen mode (1/2/9) ", Mode
  6.    SELECT CASE Mode
  7.    CASE 1
  8.       MaxColor = 3
  9.    CASE 2
  10.       MaxColor = 1
  11.    CASE 9
  12.       MaxColor = 15
  13.    CASE ELSE
  14.       END
  15.    END SELECT
  16.  
  17. SCREEN Mode
  18. DEF SEG = &HFFA6               'ROM segment for character shape tables
  19.  
  20. DO
  21.    CLS
  22.    INPUT "Enter something to print "; A$
  23.    IF A$ = "" THEN SCREEN 0: END
  24.  
  25.    X = 13                      'X/Y location to start printing
  26.    Y = 20
  27.    CO = 1                      'initial color
  28.  
  29.    FOR I = 1 TO LEN(A$)        'step through the string
  30.        Addr = 8 * ASC(MID$(A$, I)) + 14 'address character shape table
  31.        FOR J = 0 TO 7                   'print the character
  32.            LINE (X + 7, Y + J)-(X, Y + J), CO, , PEEK(Addr + J) * 128
  33.        NEXT
  34.        X = X + 10                       'advance right ten pixels
  35.        Y = Y + 3                        'go down three pixels
  36.        CO = CO + 1                      'increment the color by one
  37.        IF CO > MaxColor THEN CO = 1     'wrap if at the maximum for
  38.    NEXT                                 'this mode
  39.    WHILE INKEY$ = "": WEND              'give 'em time to see it
  40. LOOP                                    'prompt for another message
  41.  
  42.